Efficient paging method code (SQL millions data paging code)
@querystr nvarchar,--table name, view name, query statement@pagesize int=10,--the size (number of rows) per page@pagecurrent int=1,--the page to display@fdshow nvarchar = ',--the list of
ASP tutorials. Net efficient paging method large data volume and with query parameters
Create Proc [dbo]. [Getrs]@QueryStr nvarchar,--table name, view name, query statement@PageSize int=10,--the size (number of rows) per page@PageCurrent int=1,--
PHP search results are displayed on the page. the problematic homepage is displayed. no data is displayed on pages... Code
Include_once ("script/conn. php "); class Page {private $ curPage; // The current Page private $ totalPages; // The total
Asp.net efficient paging method with large data volume and query parameters
Asp tutorial. net efficient paging method large data volume with query parameters
Create Proc [dbo]. [GetRS]@ QueryStr nvarchar (300), -- table name, view name, query
Because the paging storage process created by the producer cannot return the total number of records, the statistics are collected again on each page. Therefore, you can add a number of returned records in the storage, which is easy to use.
@
/*After testing, 14483461 pages are queried in 100,000th records. The first and second time of 10 records on each page is 0.47 seconds in ascending and descending order, and the second time is 0.43 seconds. The test syntax is as follows:Exec
server|sqlserver| Stored Procedures | paging
/*--displays the specified table using a paging program implemented by the stored procedure, view, page X of query results for the primary key or identity column in the table, fetch the query directly
It is more efficient to use stored procedures on SQL Server pages.Create proc p_show
@ Querystr varchar (8000), -- table name, view name, query statement
@ Pagesize Int = 10, -- size of each page (number of rows)
@ Pagecurrent Int = 1, -- the page
Recently, the project database management system was migrated from SQLSERVER2000 to MySQL. Previously, the database management system was connected to SQLSERVER Based on ADO. After using the MySQL database management system, the database creation,
PHP Search Results page display problem:
Home display no problem, page display data not ... Code
Include_once ("script/conn.php");Class page{private $curPage;//Current pageprivate $totalPages;//How many pages of data are displayedprivate $dispNum;//
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.